package com.example.pptls;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;


public class MainActivity extends Activity {

	private RadioGroup rg;
	private EditText edt, edt2;
	private int modojuego;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		ListenerBoton l = new ListenerBoton(this);
		Button button1 = (Button)findViewById(R.id.botAceptar1);
		rg = (RadioGroup)findViewById(R.id.radioGroup1);
		edt=(EditText)findViewById(R.id.editText1);
		edt2=(EditText)findViewById(R.id.editText2);
	
		button1.setOnClickListener(l);
		rg.setOnCheckedChangeListener(l);
		
		edt2.setEnabled(false);
		
		modojuego=1;
	}

	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	
	switch(item.getItemId()){
	case R.id.file:
		Intent intent5 = new Intent(this, Ficheros.class);
		startActivity(intent5);
		break;
	case R.id.ayuda:
		Intent intent = new Intent(this, Ayuda.class);
		startActivity(intent);
		break;
	case R.id.reglas:
		Intent intent2 = new Intent(this, Reglas.class);
		startActivity(intent2);
		break;
	case R.id.info:
		Intent intent3 = new Intent(this, Acerca.class);
		startActivity(intent3);
		break;
	case R.id.score:
		Intent intent4 = new Intent(this, Score.class);
		startActivity(intent4);
		break;
	
	}
	return super.onOptionsItemSelected(item);
}
	
		
	
	
	public EditText getEdt() {
		return edt;
	}


	public void setEdt(EditText edt) {
		this.edt = edt;
	}


	


	public RadioGroup getRg() {
		return rg;
	}


	public void setRg(RadioGroup rg) {
		this.rg = rg;
	}


	public int getModojuego() {
		return modojuego;
	}


	public void setModojuego(int modojuego) {
		this.modojuego = modojuego;
	}


	public EditText getEdt2() {
		return edt2;
	}


	public void setEdt2(EditText edt2) {
		this.edt2 = edt2;
	}

}
